/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

define([ 'adminapp'], function ($app) {
    $app.navactive('floor');
    $app.formvalidator({
        'floor.name'       : {
            required : true,
            maxlength: 30
        },
        'floor.description': {
            maxlength: 180
        }
    }, 'floorForm');

    $app.uploader({'buttonText': '点击上传楼层图片',width: 140}, 'floorAttachmentUpload');

    $app.single_uploader({
        'uploader'       : g.ctx + 'file/up?dpi=gift',
        'buttonText'     : '点击上传礼品封面',
        'width'           : 120,
        'hideButton'      : true,
        'height'          : 20
    },'pic_image_btn');

    $app.single_uploader({
        'uploader'       : g.ctx + 'file/up?dpi=gift',
        'buttonText'     : '点击上传礼品封面',
        'width'           : 120,
        'hideButton'      : true,
        'height'          : 20
    },'location_image_btn');
    return {};
});